<?php 
namespace Administrator\Model;

use Zend\Crypt\PublicKey\Rsa\PublicKey;
class ListUser
{
	public $ID_USER;
	public $EMAIL_USER;	
	public $PASS_USER;
	public $ACTIVE;
	public $NAME;
	public $CREATED_ON;
	public $MODIFIED_ON;
	public $role_id;

	public $vaitro_user;
	public $email_user;
	public $name_user;
	public $password_user;
	public $active_user;
	public $password_user_edit;
	public $jsandcssfile;
	
	public function exchangeArray($data)
	{
		$this->ID_USER     = (!empty($data['ID_USER'])) ? $data['ID_USER'] : null;
		$this->EMAIL_USER = (!empty($data['EMAIL_USER'])) ? $data['EMAIL_USER'] : null;	
		$this->PASS_USER = (!empty($data['PASS_USER'])) ? $data['PASS_USER'] : null;
		$this->ACTIVE     = (!empty($data['ACTIVE'])) ? $data['ACTIVE'] : null;
		$this->NAME = (!empty($data['NAME'])) ? $data['NAME'] : null;
		$this->CREATED_ON = (!empty($data['CREATED_ON'])) ? $data['CREATED_ON'] : null;
		$this->MODIFIED_ON = (!empty($data['MODIFIED_ON'])) ? $data['MODIFIED_ON'] : null;
		$this->role_id = (!empty($data['role_id'])) ? $data['role_id'] : null;
	}
	
	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}
	
	
	public function addArray($data)
	{
		$this->vaitro_user = (!empty($data['vaitro_user'])) ? $data['vaitro_user'] : null;
		$this->email_user = (!empty($data['email_user'])) ? $data['email_user'] : null;
		$this->name_user = (!empty($data['name_user'])) ? $data['name_user'] : null;		
		$this->password_user = (!empty($data['password_user'])) ? $data['password_user'] : null;
		$this->active_user = (!empty($data['active_user'])) ? $data['active_user'] : null;
		$this->password_user_edit = (!empty($data['password_user_edit'])) ? $data['password_user_edit'] : null;
		
	}
	
	public function jsandcssfile($data){
		$this->jsandcssfile = (!empty($data['jsandcssfile'])) ? $data['jsandcssfile'] : null;
	}
}